package cn.com.cifi.mars.web.action.sys;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import cn.com.cifi.mars.bean.vo.sys.rsp.IdmPositionPageVo;
import cn.com.cifi.mars.bean.vo.sys.rsp.PositionDetailVo;
import cn.com.cifi.mars.common.bean.R;
import cn.com.cifi.mars.common.constants.VersionConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;


@Api(tags = {"系统管理"})
@RequestMapping("/${spring.data.rest.base-path}/{apiVersion}/sys/position")
public interface IPositionController {

	@ApiOperation(value = "分页查询组织机构下的--岗位信息", notes = "分页查询组织机构下的--岗位信息")
	@GetMapping(value = "orgPositionPage")
	public R<IdmPositionPageVo> getOrgPositionPage(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "当前第几页", required = true, defaultValue = "1") @RequestParam(value = "current") String current,
			@ApiParam(value = "每页条数", required = true, defaultValue = "2") @RequestParam(value = "pageSize") String pageSize,
			@ApiParam(value = "岗位名称", required = false) @RequestParam(name = "jobName" ,defaultValue = "") String jobName,
			@ApiParam(value = "部门id", required = false) @RequestParam(name = "belongDepId" ,defaultValue = "") String belongDepId);
	
	@ApiOperation(value = "权限管理-岗位明细分页", notes = "权限管理-岗位明细分页")
	@GetMapping(value = "postAuthPage")
	public R<PositionDetailVo> getPostAuthPage(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "当前第几页", required = true, defaultValue = "1") @RequestParam(value = "current") String current,
			@ApiParam(value = "每页条数", required = true, defaultValue = "10") @RequestParam(value = "pageSize") String pageSize,
			@ApiParam(value = "岗位名称", required = false) @RequestParam(name = "jobName" ,defaultValue = "") String jobName,
			@ApiParam(value = "岗位组id", required = true) @RequestParam(name = "belongJobDefId", defaultValue = "") String belongJobDefId);
	
	@ApiOperation(value = "根据岗位名称查询岗位下的用户", notes = "根据岗位名称查询岗位下的用户")
	@GetMapping(value = "jobName")
	public R<String> getUserByJobName(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "岗位名称", required = false) @RequestParam(name = "jobName" ,defaultValue = "") String jobName);

}
